using System.Diagnostics;
using System.Xml.Serialization;

namespace Edmx.Storage
{
    [DebuggerDisplay("Action={Action}")]
    [XmlType(Namespace = EdmxConstants.StorageSchemaNamespace)]
    public class OnAction : MetadataEntityBase<OnAction>
    {
        private Action? _action;

        [XmlAttribute("Action")]
        public Action Action
        {
            get { return _action ?? Action.None; }
            set { _action = value; }
        }

        public bool ShouldSerializeAction()
        {
            return _action.HasValue;
        }

    }
}